// 本文件由自动工具 proto.py 自动生成，请勿修改
// filename msg1000_csbuf.ts
// package ptl


// message Err
export class Err {
	protoid: number = 1;
	err: number = 0;
	msg: string = "";
	proto: number = 0;


Marshal(writer: any) {
	writer.setUint16(this.err, 1)
	writer.setString(this.msg, 2)
	writer.setUint16(this.proto, 3)
}

Unmarshal(reader: any) {
	this.err = reader.getUint16(1)
	this.msg = reader.getString(2)
	this.proto = reader.getUint16(3)
}
}

// message RegisterUdpReq
export class RegisterUdpReq {
	protoid: number = 2;
	playerId: string = "";
	token: string = "";


Marshal(writer: any) {
	writer.setString(this.playerId, 1)
	writer.setString(this.token, 2)
}

Unmarshal(reader: any) {
	this.playerId = reader.getString(1)
	this.token = reader.getString(2)
}
}

// message RegisterUdpResp
export class RegisterUdpResp {
	protoid: number = 2;
	


Marshal(writer: any) {
	
}

Unmarshal(reader: any) {
	
}
}

// message Ping
export class Ping {
	protoid: number = 3;
	ping: number = 0;
	playerId: string = "";


Marshal(writer: any) {
	writer.setUint32(this.ping, 1)
	writer.setString(this.playerId, 2)
}

Unmarshal(reader: any) {
	this.ping = reader.getUint32(1)
	this.playerId = reader.getString(2)
}
}

// message Pong
export class Pong {
	protoid: number = 3;
	ping: number = 0;


Marshal(writer: any) {
	writer.setUint32(this.ping, 1)
}

Unmarshal(reader: any) {
	this.ping = reader.getUint32(1)
}
}

// message NoticeReq
export class NoticeReq {
	protoid: number = 5;
	type: number = 0;


Marshal(writer: any) {
	writer.setUint16(this.type, 1)
}

Unmarshal(reader: any) {
	this.type = reader.getUint16(1)
}
}

// message NoticeResp
export class NoticeResp {
	protoid: number = 5;
	type: number = 0;
	msg: string = "";


Marshal(writer: any) {
	writer.setUint16(this.type, 1)
	writer.setString(this.msg, 2)
}

Unmarshal(reader: any) {
	this.type = reader.getUint16(1)
	this.msg = reader.getString(2)
}
}

// message OpinionReq
export class OpinionReq {
	protoid: number = 6;
	playerId: string = "";
	msg: string = "";
	token: string = "";


Marshal(writer: any) {
	writer.setString(this.playerId, 1)
	writer.setString(this.msg, 2)
	writer.setString(this.token, 3)
}

Unmarshal(reader: any) {
	this.playerId = reader.getString(1)
	this.msg = reader.getString(2)
	this.token = reader.getString(3)
}
}

// message OpinionResp
export class OpinionResp {
	protoid: number = 6;
	playerId: string = "";


Marshal(writer: any) {
	writer.setString(this.playerId, 1)
}

Unmarshal(reader: any) {
	this.playerId = reader.getString(1)
}
}

// message RecvReq
export class RecvReq {
	protoid: number = 8;
	playerId: string = "";
	tag: number = 0;


Marshal(writer: any) {
	writer.setString(this.playerId, 1)
	writer.setInt32(this.tag, 2)
}

Unmarshal(reader: any) {
	this.playerId = reader.getString(1)
	this.tag = reader.getInt32(2)
}
}

